﻿using System;
using Ext.Net;

namespace CourseManager.View
{
	public partial class Main : System.Web.UI.Page
	{
		private String UserID { get; set; }

		protected void Page_Load(object sender, EventArgs e)
		{
			//Session["UserId"] = "08122333";
			if(Session["UserId"] == null)
			{
				Response.Redirect("ErrorPage.htm");
			}
			else
			{
				UserID = Session["UserId"].ToString();
			}
			if (!IsPostBack) 
			{
				pnlMain.LoadContent(new LoadConfig("MainContent.aspx", LoadMode.IFrame, true));
			}

			txtUserInfo.Text = "当前用户：" + UserID;
			hidserverTime.Value = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
			
			Notification.Show(new NotificationConfig
			                  {
								  
			                  		Title = "Welcome",
			                  		Icon = Icon.Information,
			                  		Html = "您好，" + UserID + "<br/><br/>欢迎登陆上海大学教学管理系统" +
			                  		       "<br/><br/>现在时间" + hidserverTime.Value,
			                  		Height = 150
			                  	});
		}

	
	}
}